<%= header %>
<%= boomerangScript %>
<base href="/pages/08-ember/27-route-change-back.html" />

<script src="../../vendor/jquery/dist/jquery.min.js"></script>
<script src="../../vendor/ember/ember.prod.js"></script>
<script src="../../vendor/handlebars/handlebars.min.js"></script>
<script src="../../vendor/ember/ember-template-compiler.js"></script>
<script>
// view a widget then come back using history.back after 2nd beacon
window.ember_nav_routes = ["/widgets/1"];
window.html5_mode = true;
window.imgs = [3000];
</script>
<script src="support/app.js"></script>

<!-- Handlebars templates for our application. -->
<script type="text/x-handlebars">
	<div class="container">
		{{outlet}}
	</div>
</script>

<script src="/test-templates/spa/04-route-change.js" type="text/javascript"></script>
<script src="27-route-change-back.js"></script>

<script>
var beaconNum = 0;
BOOMR.subscribe("beacon", function() {
	if (!BOOMR.plugins.AutoXHR) {
		return;
	}

	beaconNum++;
	if (beaconNum === 2) {
		setTimeout(function() {
			window.history.back();
		}, 200);
	}
});

BOOMR_test.init({
	testAfterOnBeacon: BOOMR.plugins.AutoXHR ? 3 : 1,
	History: {
		enabled: true,
		monitorHistory: false
	},
	instrument_xhr: true,
	autorun: false
});
</script>

<%= footer %>
